<extend name='./Public/Base/base.html' />
<block name='script'>
	<link rel="stylesheet" href="__PUBLIC__/Admin/service_list.css"> 
</block>
<block name='content'>

<div class='container-layout'>
	<div class='line margin'>
		<div class='x9'>首页 / 项目管理 / 服务管理</div>
	</div>

	<!--添加服务-->
	<div class='line hiddens ServiceCon'>
		<form action='service_type_sub' method='post' >
			<div class='x2 '>
				<lable class='label'>服务名：
					<input type='text' class='input' name='name' />
				</lable>
			</div>
			<div class='x2 '>
				<lable class='label'>序号：
					<input type='text' class='input' name='order' />
				</lable>
			</div>
			<div class='x2 Padding-top20'>
				<input  type='submit' class='button bg-sub'  value='添加' ></button>
			</div>
		</form>
	</div>




	

	<!--显示数据-->
	<div class='line'>
		<div class='x12'>
			<table class='table Service_list'>
				<tr>
					<th>服务名</th>
					<th>排序等级</th>
					<th>操作</th>
				</tr>
				<volist name='res.list' id='vo'>
					<tr>
						<td>{$vo.type_name}</td>
						<td>{$vo.type_order}</td>
						<td>
							<a class='button button-little bg-sub ServiceDel' sid='{$vo.type_id}'>删除</a>
						</td>
					</tr>
				</volist>
			</table>			
		</div>
	</div>

	<!--显示分页-->
	<div class='line margin-large'>
		<if condition="$res_list_count gt 0">
			<div class='x12  text-center'>
				{$res['fpage']}
			</div>
		</if>
	</div>

</div>





</block>
<block name='bottom'>
	<script src="__PUBLIC__/Admin/admin_nav1.js"></script> 
	<script>
		$(function(){
			$(".ServiceDel").click(function(){
				var sid = $(this).attr('sid');
				alert(sid);exit;
				$.ajax({
					url:'__URL__/token',
					data:{
						token:'ServiceDel',
					},
					type:'post',
					success:function(res){
						var token = res;
						$.ajax({
							url:'__URL__/service_del',
							data:{
								sid:sid,
								token_name:'ServiceDel',
								token:token
							},
							type:'post',
							success:function(res){
								if(res == 'ok'){
									alert('删除成功！');
									location.reload(true);
								}else{
									alert('删除失败!');
								}
							}
						});
					}
				})
			});
		});
	</script>
</block>